from utils import create_chrome_driver,add_cookies,test
import json
import time
from selenium.webdriver.common.by import By

browser=create_chrome_driver()
time.sleep(1)

# 先访问下页面再设置cookie,否则报错
browser.get('https://taobao.com')
time.sleep(1)
add_cookies(browser,'taobao_cookie.json')
time.sleep(1)

browser.get('https://s.taobao.com/search?q=手机')
time.sleep(1)

time.sleep(600)